package com.steven.im.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.steven.im.R;
import com.steven.im.entity.WalletEntity;
import com.steven.im.utils.StringUtils;

import java.util.List;

/**
 * 我的钱包
 */
public class MyWalletAdapter extends BaseQuickAdapter<WalletEntity, BaseViewHolder> {

    public MyWalletAdapter(@Nullable List<WalletEntity> data) {
        super(R.layout.item_trade, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, WalletEntity item) {
        helper.setText(R.id.tv_title, item.getTradeTitle());
        helper.setText(R.id.tv_time, StringUtils.timesToString(item.getTradeTime().getTime()));
        helper.setText(R.id.tv_money, item.getTradeCashShow());
    }
}
